<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Nov 3, 2010 10:08:36 AM by Hibernate Tools 3.2.4.GA -->
<hibernate-mapping>
    <class name="acme.data.UserBooking" table="userbookings">
        <id name="bookingId" type="string">
            <column name="booking_id" />
            <generator class="assigned" />
        </id>
        <many-to-one name="User" class="acme.data.User" fetch="select">
            <column name="user_id" not-null="true" />
        </many-to-one>
        <property name="startDate" type="date">
            <column name="start_date" length="10" not-null="true" />
        </property>
        <property name="returnDate" type="date">
            <column name="return_date" length="10" not-null="true" />
        </property>
        <property name="amountPaid" type="float">
            <column name="amount_paid" precision="12" scale="0" not-null="true" />
        </property>     
        <property name="carBookingId" type="string">
            <column name="car_booking_id" />
        </property>
        <property name="apartmentBookingId" type="string">
            <column name="apartment_booking_id" not-null="true" />
        </property>         
        <property name="startFlightBookingId" type="string">
            <column name="start_flight_booking_id" not-null="true" />
        </property>
        <property name="returnFlightBookingId" type="string">
            <column name="return_flight_booking_id" not-null="true" />
        </property>                 
    </class>
</hibernate-mapping>
